#ifndef WCHARACTER
#define WCHARACTER

#include "Actor.h"
#include "CollisionSolver.h"
#include "AnimationSolver.h"

enum CSTATE {CS_stand,CS_crouch,CS_hide,CS_jump,CS_fall,CS_move,CS_prejump,CS_stun,CS_defeat,CS_lowattack,CS_highattack,CS_specialattack,CS_stealthcv,CS_defeatcv,CS_strokeoff};

class Character : public Actor
{
	protected:
		CollisionSolver *p_solver;
		AnimationSolver *p_animator;
		CSTATE m_state;
		sf::Texture *m_miniview;
		int m_frame;
		float m_frameclock;
		float m_ticker;
		bool m_flip;

		void Gravity(float dt);
		TILETYPE Floorcheck();
		void Friction(float dt);

		void Collision(float dt);

		WorldElement *p_plat;
		bool Supported();
		bool NotShlurped();
		bool NotBusy();
		virtual void ProcessCollision(Actor *actor);



	public:
		Character(){};

		CSTATE getState();
		bool getFlipped();
		sf::Texture *getMiniview();
		virtual void Land();

		virtual void Link(CollisionSolver *solver);

		virtual bool Vore(bool flip);
};
#endif